package bm.com.framework.common.unit;


import bm.com.framework.common.exception.BmException;
import jakarta.servlet.http.HttpServletResponse;
import lombok.extern.slf4j.Slf4j;

import java.io.IOException;

@Slf4j
public class WebUnit {


    public static String renderString(HttpServletResponse response, String string)
    {
        try{

            response.setStatus(200);
            response.setContentType("application/json");
            response.setCharacterEncoding("utf-8");
            response.getWriter().print(string);

        } catch (IOException e) {
            log.error("renderString error", e.getMessage());
        }
        return null;
    }

}
